package com.iwdnb.gkgz.job;

import java.util.Date;

import cn.hutool.core.date.DateUtil;
import com.iwdnb.gkgz.application.service.RealtimeStockService;
import com.iwdnb.gkgz.application.service.StockEmotionService;
import com.iwdnb.job.annotation.Job;
import com.iwdnb.job.handler.BaseJobHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import static com.iwdnb.gkgz.common.utils.WorkTimeUtils.isWorkingTime;

/**
 * 股票计算当天情绪信息
 */
@Slf4j
@Job(cron = "0 10 16,21 * * ?")
public class StockEmotionFenshiJob extends BaseJobHandler {

    @Autowired
    private StockEmotionService stockEmotionService;

    @Override
    public boolean doProcess(String parameter) {
        log.info("StockEmotionFenshiJob start");
        String date= DateUtil.formatDate(new Date());
        stockEmotionService.getFenshiStockEmotion(date);
        log.info("StockEmotionFenshiJob finished");
        return true;
    }
}
